package cn.truistic.enmicromsg.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by admin on 2018/6/1.
 */

public class TimeUtils {
    public static  final String TIME_STYLE = "yyyy-MM-dd HH:mm:ss";

    /**
     * 时间转换 将毫秒转换成日期
     * @param millisecond
     * @param style
     * @return
     */
    public static String timeFormat(Long millisecond ,String  style ) {
        SimpleDateFormat simpleDateFormat =new  SimpleDateFormat(style);
        Date date = new  Date(millisecond);
        return simpleDateFormat.format(date);
    }
}
